

///  锦绣龙城数据清理

var jxlcDataCleaner = (data) => {


    for (let i = 0; i < data.length; i++) {

        let ri = data[i].RoomInfo;// 锦绣龙城-商业43栋1-1101与106


        // 六号楼
        var keyList3 = ['六号楼']
        for (let j = 0; j < keyList3.length; j++) {
            let key = keyList3[j];
            if (ri.indexOf(key) > -1) {
                var temp = data[i].RoomInfo.split('-');
                data[i].RoomInfo = temp[0] + '-' + temp[1] + '-' + data[i].Floor + '-' + temp[2] + temp[3] + temp[4];
                break;
            }
        }

        // 七号楼
        keyList3 = ['七号楼']
        for (let j = 0; j < keyList3.length; j++) {
            let key = keyList3[j];
            if (ri.indexOf(key) > -1) {
                var temp = data[i].RoomInfo.split('-');
                data[i].RoomInfo = temp[0] + '-' + temp[1] + '-' + temp[2] + '-' + temp[3];
                break;
            }
        }

    }

}

module.exports = {
    jxlcDataCleaner: jxlcDataCleaner
}